package com.loan.system.create.service.impl;

import com.loan.common.utils.DateUtils;
import com.loan.system.create.domain.AssistPdfSearchBase;
import com.loan.system.create.mapper.AssistPdfSearchBaseMapper;
import com.loan.system.create.service.IAssistPdfSearchBaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 检索数据Service业务层处理
 *
 * @author Sophia
 * @date 2024-07-06
 */
@Service
public class AssistPdfSearchBaseServiceImpl implements IAssistPdfSearchBaseService {
    @Autowired
    private AssistPdfSearchBaseMapper assistPdfSearchBaseMapper;

    /**
     * 查询检索数据
     *
     * @param id 检索数据主键
     * @return 检索数据
     */
    @Override
    public AssistPdfSearchBase selectAssistPdfSearchBaseById(Long id) {
        return assistPdfSearchBaseMapper.selectAssistPdfSearchBaseById(id);
    }

    /**
     * 查询检索数据列表
     *
     * @param assistPdfSearchBase 检索数据
     * @return 检索数据
     */
    @Override
    public List<AssistPdfSearchBase> selectAssistPdfSearchBaseList(AssistPdfSearchBase assistPdfSearchBase) {
        return assistPdfSearchBaseMapper.selectAssistPdfSearchBaseList(assistPdfSearchBase);
    }

    /**
     * 新增检索数据
     *
     * @param assistPdfSearchBase 检索数据
     * @return 结果
     */
    @Override
    public int insertAssistPdfSearchBase(AssistPdfSearchBase assistPdfSearchBase) {
        assistPdfSearchBase.setCreateTime(DateUtils.getNowDate());
        return assistPdfSearchBaseMapper.insertAssistPdfSearchBase(assistPdfSearchBase);
    }

    /**
     * 修改检索数据
     *
     * @param assistPdfSearchBase 检索数据
     * @return 结果
     */
    @Override
    public int updateAssistPdfSearchBase(AssistPdfSearchBase assistPdfSearchBase) {
        assistPdfSearchBase.setUpdateTime(DateUtils.getNowDate());
        return assistPdfSearchBaseMapper.updateAssistPdfSearchBase(assistPdfSearchBase);
    }

    /**
     * 批量删除检索数据
     *
     * @param ids 需要删除的检索数据主键
     * @return 结果
     */
    @Override
    public int deleteAssistPdfSearchBaseByIds(Long[] ids) {
        return assistPdfSearchBaseMapper.deleteAssistPdfSearchBaseByIds(ids);
    }

    /**
     * 删除检索数据信息
     *
     * @param id 检索数据主键
     * @return 结果
     */
    @Override
    public int deleteAssistPdfSearchBaseById(Long id) {
        return assistPdfSearchBaseMapper.deleteAssistPdfSearchBaseById(id);
    }

    @Override
    public Integer insertSearchBaseList(List<AssistPdfSearchBase> searchBaseList) {
        return assistPdfSearchBaseMapper.insertSearchBaseList(searchBaseList);
    }

    @Override
    public List<String> selectAllList() {
        return assistPdfSearchBaseMapper.selectAllList();
    }
}
